Package MusicLandscape.util.comparators
Class MyEventDateComparator
- java.lang.Object
-
- MusicLandscape.util.comparators.MyEventComparator
-
- MusicLandscape.util.comparators.MyEventDateComparator
-
public class MyEventDateComparator extends MyEventComparator
This class represents the concept of comparison of two events. It has a single abstract method that is to be implemented by concrete subclasses which implement concrete modes of comparison, e.g. by attendees, by date or other.- Since:
- ExerciseSheet04
- Version:
- 1
- Author:
- Jonas Altrock (ew20b126@technikum-wien.at)
-
-
Constructor Summary
Constructors Constructor Description MyEventDateComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Event e1, Event e2)Compare two events by their dates.
-
-
-
Method Detail
-
compare
public int compare(Event e1, Event e2)
Compare two events by their dates.- Specified by:
comparein classMyEventComparator- Parameters:
e1- the one event to comparee2- the other event to compare- Returns:
- a measure of the distance between e1 and e2 in the sense of the comparator
-
-